package com.wk.database;

import java.util.HashMap;
import java.util.Map;
import java.util.Set;


public class IdToMachine {
	private Map<String, String> idToMachine = new HashMap<>();
	
	public String put(String key,String value){
		return idToMachine.put(key, value);
	}
	public String get(String key){
		if(!DB_Mysql.refreshMachinesInfo(idToMachine)){
			try {
				throw new Exception();
			} catch (Exception e) {
				System.out.println("刷新机器映射表出错~！！");
				e.printStackTrace();
			}
		}
		return idToMachine.get(key);
	}
	@Override
	public String toString() {
		return "IdToMachine [idToMachine=" + idToMachine + "]";
	}
	
	
}
